# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-mail-mbox-messageparser
_cpanname=Mail-Mbox-MessageParser
pkgver=1.5002
pkgrel=1
pkgdesc="A fast and simple mbox folder reader "
arch=('any')
url="http://search.cpan.org/~DCOPPIT/${_cpanname}"
license=('GPL' 'PerlArtistic')
depends=('perl-filehandle-unget' 'perl>=5.10.0')
makedepends=('perl-text-diff')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/D/DC/DCOPPIT/${_cpanname}-${pkgver}.tar.gz) 
md5sums=('0df054faf3a43a537636ea7ca997694c')

build() {
  cd $srcdir/${_cpanname}-${pkgver}
  sed -i '/^auto_install/d' Makefile.PL
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
  make install DESTDIR=$pkgdir
  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}
